package com.i2works.smartluolong.web.service.merchant;

import com.alibaba.fastjson.JSONObject;
import com.i2works.smartluolong.utils.basecommon.BaseCommonService;
import com.i2works.smartluolong.utils.exception.ServiceException;
import com.i2works.smartluolong.web.entity.merchant.MerchantApplyDO;
import com.i2works.smartluolong.web.entity.merchant.MerchantApplyQuery;

import java.util.List;
import java.util.Map;

/**
 * 个体商户申请 - 业务层接口
 *
 * @author Liu Yutao <koal@vip.qq.com>
 * @date 2018/7/23 21:09
 */

public interface IMerchantApplyService extends BaseCommonService<MerchantApplyQuery, MerchantApplyDO> {


    /**
     * 获取审核人员可管理的申请列表
     */
    List<MerchantApplyDO> queryListByAuditor(MerchantApplyQuery query) throws ServiceException;


    /**
     * 获取申请资料详情
     */
    Map<String,Object> getApplyDetail(Integer applyId) throws ServiceException;

    /**
     * 获取审核人员可管理的申请列表统计
     */
    Integer queryCountByAuditor(MerchantApplyQuery query) throws ServiceException;

    /**
     * 更新申请状态
     *
     * @param companyApplyDO 申请实体
     * @param auditorId      审核人员ID
     * @param isClaim        是否认领状态
     */
    void updateApplyStatus(MerchantApplyDO merchantApplyDO, Integer auditorId, Boolean isClaim) throws ServiceException;


    /**
     * 查询报表列表
     */
    List<JSONObject> queryReportList(MerchantApplyQuery query) throws ServiceException;
}
